﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Infrastructure.ObjectModel;
using Microsoft.Xna.Framework;

namespace Infrastructure.ObjectModel
{
    public class UtilityService : GameService
    {
        private Random s_rnd;

        public UtilityService(Game i_Game) : base(i_Game)
        {
            s_rnd = new Random();
        }

        protected override void RegisterAsService()
        {
            Game.Services.AddService(typeof(UtilityService), this);
        }

        public bool RandomCondition(int inPropability)
        {
            return (s_rnd.Next(inPropability) == 0);
        }
    }
}
